#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QMouseEvent>
#include "dbconnector.h"
#include "datapre.h"
#include "memberdialog.h"
#include "addleavedialog.h"
#include "common.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();
    bool setTable();
    void  showEvent(QShowEvent* event);




private slots:

    void on_calendarWidget_clicked(const QDate &date);

    void on_saveMember();

    void on_saveLeaves();


    void on_addButton_clicked();

    void on_deleteButton_clicked();

    void on_memButton_clicked();

    void on_tableWidget_itemSelectionChanged();

protected:


private:
    Ui::MainWindow *ui;
    MemberDialog *md;
    AddLeaveDialog *ld;
    DBConnector dbc;
    MemberManage  mm;
    DayLeave dl;
};

#endif // MAINWINDOW_H
